function [num,pro] = pro_mingchao()
A = ones(1,65)*0.8/100;
B = linspace(4,20,5)/100+0.8/100;
C = linspace(8,40,5)/100+20.8/100;
D = linspace(10,30,3)/100+60.8/100;
P=[A,B,C,D,1,1];
Pi=ones(1,80);a=1;q=0;
for k=1:80
    Pi(k)=a*P(k);%恰好第K次抽中概率
    q=q+Pi(k)*k;%出货期望抽数
    a=a*(1-P(k));
end
plot(Pi);
format long
num = q;
pro = 1/q*100;
format default